# coding=utf-8
'''
Created on 2010-8-8

@author: morningbzy
'''
from sgs.common.constants import cardColor
from sgs.skill.skill_base import SkillBase
from sgs.card.sha import Sha

class WuSheng(SkillBase):
    name = '武圣'
    
    def action(self, cond, src):
        card = src.callGameAction('requireCard', cond, 
                condition={'color': (cardColor.HEART,
                                     cardColor.DIANMOND)},
                msg='你使用了技能【武圣】，请选择一张红牌')
        if card:
            fakeCard = Sha(card.color, card.point, card.cardType)
            fakeCard.setId(card.id)
            fakeCard.setOriginalCard(card)
            fakeCard.action(cond, src)
